<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('keyword_searches', function (Blueprint $table) {
            $table->id();
            $table->string('map')->comment('地图');
            $table->string('category')->comment('获客分类');
            $table->string('province')->comment('省份');
            $table->string('city')->comment('城市');
            $table->string('district')->comment('区域');
            $table->string('address')->nullable()->comment('地址');
            $table->unsignedSmallInteger('radius')->nullable()->comment('查询半径');
            $table->string('keyword')->comment('关键词/行业');
            $table->timestamps();
            $table->softDeletes();
            $table->comment('关键词搜索表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('keyword_searches');
    }
};
